package face.pay.dao;

import face.pay.entity.CpnCardMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Classname CpnCardMessageDao
 * @Description Administrator
 * @Date 2019/12/16 11:57
 */
@Mapper
public interface CpnCardMessageDao {

    void insert(CpnCardMessage cpnCardMessage);

    void update(CpnCardMessage cpnCardMessage);

    /**
     * 查询用户领取优惠券未成功推送的信息
     * @return
     */
    List<CpnCardMessage> queryGetCardMessage(@Param("type")String type ,@Param("nowTime")String nowTime);

    /**
     * 查询用户使用优惠券并核销完的消息
     * @param type
     * @param nowTime
     * @return
     */
    List<CpnCardMessage> queryConsumeMessage(@Param("type")String type ,@Param("nowTime")String nowTime);


    void insertBatch(List<CpnCardMessage> messageList);
}
